home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / etc / ppp / ip-down.d / 0000usepeerdns next >
Text File  |  2009-02-20  |  559b  |  25 lines

  1. #!/bin/sh -e
  2.  
  3. # exit if the resolvconf package is installed
  4. [ -x /sbin/resolvconf ] && exit 0
  5.  
  6. # follow any symlink to find the real file
  7. if [ -e /etc/resolv.conf ]; then
  8.   REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
  9. else
  10.   REALRESOLVCONF=/etc/resolv.conf
  11. fi
  12.  
  13. # if an old resolv.conf file exists, restore it
  14. if [ -e $REALRESOLVCONF.pppd-backup ]; then
  15.   mv -f $REALRESOLVCONF.pppd-backup $REALRESOLVCONF
  16.  
  17.   # restart nscd because resolv.conf has changed
  18.   if [ -e /var/run/nscd.pid ]; then
  19.     /etc/init.d/nscd restart || true
  20.   fi
  21. fi
  22.  
  23. exit 0
  24.  
  25.